package com.bsoft.gol.hcs.specialist.entity;

import javax.persistence.*;
import java.util.Date;

/**
 * @author tongtp
 * @version v0.1
 * @className FollowUpPlanProduceRecord
 * @description
 * @create 2020-07-28 9:51
 **/
@Entity
@Table(name = "follow_up_plan_produce_record")
public class FollowUpPlanProduceRecord {
	private long id;
	private long routeId;
	private long teamChronicGroupId;
	private long routeDetailId;
	private byte status;
	private byte followUpFrequency;
	private Date startTime;
	private Date endTime;
	private Date gmtCreate;
	private Date gmtModified;
	private byte followUpFrequencyTime;
	private int followUpFrequencyNumber;
	private int producedTimes;
	private byte followUpPlanFlag;

	@Id
	@Column(name = "id")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@Basic
	@Column(name = "route_id")
	public long getRouteId() {
		return routeId;
	}

	public void setRouteId(long routeId) {
		this.routeId = routeId;
	}

	@Basic
	@Column(name = "team_chronic_group_id")
	public long getTeamChronicGroupId() {
		return teamChronicGroupId;
	}

	public void setTeamChronicGroupId(long teamChronicGroupId) {
		this.teamChronicGroupId = teamChronicGroupId;
	}

	@Basic
	@Column(name = "route_detail_id")
	public long getRouteDetailId() {
		return routeDetailId;
	}

	public void setRouteDetailId(long routeDetailId) {
		this.routeDetailId = routeDetailId;
	}

	@Basic
	@Column(name = "status")
	public byte getStatus() {
		return status;
	}

	public void setStatus(byte status) {
		this.status = status;
	}

	@Basic
	@Column(name = "follow_up_frequency")
	public byte getFollowUpFrequency() {
		return followUpFrequency;
	}

	public void setFollowUpFrequency(byte followUpFrequency) {
		this.followUpFrequency = followUpFrequency;
	}

	@Basic
	@Column(name = "start_time")
	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	@Basic
	@Column(name = "end_time")
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	@Basic
	@Column(name = "gmt_create")
	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	@Basic
	@Column(name = "gmt_modified")
	public Date getGmtModified() {
		return gmtModified;
	}

	public void setGmtModified(Date gmtModified) {
		this.gmtModified = gmtModified;
	}

	@Basic
	@Column(name = "follow_up_frequency_time")
	public byte getFollowUpFrequencyTime() {
		return followUpFrequencyTime;
	}

	public void setFollowUpFrequencyTime(byte followUpFrequencyTime) {
		this.followUpFrequencyTime = followUpFrequencyTime;
	}

	@Basic
	@Column(name = "follow_up_frequency_number")
	public int getFollowUpFrequencyNumber() {
		return followUpFrequencyNumber;
	}

	public void setFollowUpFrequencyNumber(int followUpFrequencyNumber) {
		this.followUpFrequencyNumber = followUpFrequencyNumber;
	}

	@Basic
	@Column(name = "produced_times")
	public int getProducedTimes() {
		return producedTimes;
	}

	public void setProducedTimes(int producedTimes) {
		this.producedTimes = producedTimes;
	}

	@Basic
	@Column(name = "follow_up_plan_flag")
	public byte getFollowUpPlanFlag() {
		return followUpPlanFlag;
	}

	public void setFollowUpPlanFlag(byte followUpPlanFlag) {
		this.followUpPlanFlag = followUpPlanFlag;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (!(o instanceof FollowUpPlanProduceRecord)) return false;

		FollowUpPlanProduceRecord that = (FollowUpPlanProduceRecord) o;

		if (id != that.id) return false;
		if (routeId != that.routeId) return false;
		if (teamChronicGroupId != that.teamChronicGroupId) return false;
		if (routeDetailId != that.routeDetailId) return false;
		if (status != that.status) return false;
		if (followUpFrequency != that.followUpFrequency) return false;
		if (followUpFrequencyTime != that.followUpFrequencyTime) return false;
		if (followUpFrequencyNumber != that.followUpFrequencyNumber) return false;
		if (producedTimes != that.producedTimes) return false;
		if (followUpPlanFlag != that.followUpPlanFlag) return false;
		if (startTime != null ? !startTime.equals(that.startTime) : that.startTime != null) return false;
		if (endTime != null ? !endTime.equals(that.endTime) : that.endTime != null) return false;
		if (gmtCreate != null ? !gmtCreate.equals(that.gmtCreate) : that.gmtCreate != null) return false;
		return gmtModified != null ? gmtModified.equals(that.gmtModified) : that.gmtModified == null;
	}

	@Override
	public int hashCode() {
		int result = (int) (id ^ (id >>> 32));
		result = 31 * result + (int) (routeId ^ (routeId >>> 32));
		result = 31 * result + (int) (teamChronicGroupId ^ (teamChronicGroupId >>> 32));
		result = 31 * result + (int) (routeDetailId ^ (routeDetailId >>> 32));
		result = 31 * result + (int) status;
		result = 31 * result + (int) followUpFrequency;
		result = 31 * result + (startTime != null ? startTime.hashCode() : 0);
		result = 31 * result + (endTime != null ? endTime.hashCode() : 0);
		result = 31 * result + (gmtCreate != null ? gmtCreate.hashCode() : 0);
		result = 31 * result + (gmtModified != null ? gmtModified.hashCode() : 0);
		result = 31 * result + (int) followUpFrequencyTime;
		result = 31 * result + followUpFrequencyNumber;
		result = 31 * result + producedTimes;
		result = 31 * result + (int) followUpPlanFlag;
		return result;
	}
}
